package com.cdtu.room.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.cdtu.room.mapper.NotificationMapper;
import com.cdtu.room.domain.Notification;
import com.cdtu.room.service.INotificationService;

/**
 * 提醒与通知Service业务层处理
 * 
 * @author hcc
 * @date 2024-02-27
 */
@Service
public class NotificationServiceImpl implements INotificationService 
{
    @Autowired
    private NotificationMapper notificationMapper;

    /**
     * 查询提醒与通知
     * 
     * @param notificationId 提醒与通知主键
     * @return 提醒与通知
     */
    @Override
    public Notification selectNotificationByNotificationId(Long notificationId)
    {
        return notificationMapper.selectNotificationByNotificationId(notificationId);
    }

    /**
     * 查询提醒与通知列表
     * 
     * @param notification 提醒与通知
     * @return 提醒与通知
     */
    @Override
    public List<Notification> selectNotificationList(Notification notification)
    {
        return notificationMapper.selectNotificationList(notification);
    }

    /**
     * 新增提醒与通知
     * 
     * @param notification 提醒与通知
     * @return 结果
     */
    @Override
    public int insertNotification(Notification notification)
    {
        return notificationMapper.insertNotification(notification);
    }

    /**
     * 修改提醒与通知
     * 
     * @param notification 提醒与通知
     * @return 结果
     */
    @Override
    public int updateNotification(Notification notification)
    {
        return notificationMapper.updateNotification(notification);
    }

    /**
     * 批量删除提醒与通知
     * 
     * @param notificationIds 需要删除的提醒与通知主键
     * @return 结果
     */
    @Override
    public int deleteNotificationByNotificationIds(Long[] notificationIds)
    {
        return notificationMapper.deleteNotificationByNotificationIds(notificationIds);
    }

    /**
     * 删除提醒与通知信息
     * 
     * @param notificationId 提醒与通知主键
     * @return 结果
     */
    @Override
    public int deleteNotificationByNotificationId(Long notificationId)
    {
        return notificationMapper.deleteNotificationByNotificationId(notificationId);
    }
}
